{# Copyright 2015 Siemens AG

   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
   This file is offered as-is, without any warranty.
#}
<spdx:relationship>
  <spdx:Relationship>
    <spdx:relationshipType rdf:resource="http://spdx.org/rdf/terms#relationshipType_describes" />
    <spdx:relatedSpdxElement>
      <spdx:Package rdf:about="{{ uri }}#SPDXRef-upload{{ packageId|url_encode }}">
        <spdx:name>{{ packageName }}</spdx:name>
        <spdx:packageFileName>{{ uploadName }}</spdx:packageFileName>
        <spdx:downloadLocation rdf:resource="http://spdx.org/rdf/terms#noassertion" />
        <spdx:packageVerificationCode>
          <spdx:PackageVerificationCode>
          <spdx:packageVerificationCodeValue>{{ verificationCode }}</spdx:packageVerificationCodeValue>
          </spdx:PackageVerificationCode>
        </spdx:packageVerificationCode>
        <spdx:checksum>
          <spdx:Checksum>
            <spdx:algorithm rdf:resource="http://spdx.org/rdf/terms#checksumAlgorithm_sha1" />
            <spdx:checksumValue>{{ sha1 | lower }}</spdx:checksumValue>
          </spdx:Checksum>
        </spdx:checksum>
        <spdx:checksum>
          <spdx:Checksum>
            <spdx:algorithm rdf:resource="http://spdx.org/rdf/terms#checksumAlgorithm_sha256" />
            <spdx:checksumValue>{{ sha256 | lower }}</spdx:checksumValue>
          </spdx:Checksum>
        </spdx:checksum>
        <spdx:checksum>
          <spdx:Checksum>
            <spdx:algorithm rdf:resource="http://spdx.org/rdf/terms#checksumAlgorithm_md5" />
            <spdx:checksumValue>{{ md5 | lower }}</spdx:checksumValue>
          </spdx:Checksum>
        </spdx:checksum>
        <spdx:licenseConcluded>
          <spdx:DisjunctiveLicenseSet>
  {% for res in mainLicenses %}
  {% if res starts with 'LicenseRef-' %}
            <spdx:member rdf:resource="{{ uri }}#{{ res|replace({' ': '-'})|url_encode }}" />
  {% else %}
            <spdx:member rdf:resource="http://spdx.org/licenses/{{ res|replace({' ': '-'})|url_encode }}" />
  {% endif %}
  {% endfor %}
          </spdx:DisjunctiveLicenseSet>
        </spdx:licenseConcluded>
        {% if licenseComments %}<spdx:licenseComments><![CDATA[
          {{ licenseComments|replace({']]>':']]><![CDATA[>'}) }}
        ]]></spdx:licenseComments>
        {% endif %}<spdx:licenseDeclared rdf:resource="http://spdx.org/rdf/terms#noassertion" />
        <spdx:licenseInfoFromFiles rdf:resource="http://spdx.org/rdf/terms#noassertion" />
        <spdx:copyrightText rdf:resource="http://spdx.org/rdf/terms#noassertion" />
        {{ fileNodes|replace({'\n':'\n          '}) }}
      </spdx:Package>
    </spdx:relatedSpdxElement>
  </spdx:Relationship>
</spdx:relationship>
